App({
  onLaunch: function () {
    var that  = this;
    wx.getStorage({
      key: 'xylc_session',
      success: function({data}) {
        console.log(data)
        that.globalData.user = data.session;
        that.globalData.sessionid = data.session.sessionid;
        that.globalData.driverName = data.session.driverName;
        that.globalData.driverAccount = data.session.driverAccount;
        that.globalData.driverCode = data.session.driverCode;
      },
    })
  },
  
  globalData: {
    user: null,
    //测试地址
    // webhost: 'http://39.108.209.250:8080/framework/ws/rest/',

    //生产正式地址
    // webhost: 'https://tms.fjxylc.com/framework/ws/rest/',

    //测试验收地址
    webhost: 'https://xytms.56shapan.com/framework/ws/rest/',

    //图片上传地址
    upLoadHost: 'https://snap.fjxylc.com',
    driverAccount: "",
    driverName: "",
    driverCode: "",
    sessionid: "",
    plan: {},
    planid: '',
    task: {},
    taskid: ''
  }
})